home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsIScriptablePlugin.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  111 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScriptablePlugin.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScriptablePlugin_h__
  6. #define __gen_nsIScriptablePlugin_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIScriptablePlugin */
  19. #define NS_ISCRIPTABLEPLUGIN_IID_STR "f1a12bba-1dd1-11b2-a95f-cdc118605e92"
  20.  
  21. #define NS_ISCRIPTABLEPLUGIN_IID \
  22.   {0xf1a12bba, 0x1dd1, 0x11b2, \
  23.     { 0xa9, 0x5f, 0xcd, 0xc1, 0x18, 0x60, 0x5e, 0x92 }}
  24.  
  25. class NS_NO_VTABLE nsIScriptablePlugin : public nsISupports {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEPLUGIN_IID)
  29.  
  30.   /**
  31.      * The object to be wrapped and exposed to JavaScript.  It should
  32.      * be an XPCOM object, and it can be the same object as the plugin.
  33.      */
  34.   /* readonly attribute nsQIResult scriptablePeer; */
  35.   NS_IMETHOD GetScriptablePeer(void * *aScriptablePeer) = 0;
  36.  
  37.   /**
  38.      * The interface that XPConnect should use when exposing the peer
  39.      * object to JavaScript.  All scriptable methods on the interface
  40.      * will be available to JavaScript.
  41.      */
  42.   /* readonly attribute nsIIDPtr scriptableInterface; */
  43.   NS_IMETHOD GetScriptableInterface(nsIID * *aScriptableInterface) = 0;
  44.  
  45. };
  46.  
  47. /* Use this macro when declaring classes that implement this interface. */
  48. #define NS_DECL_NSISCRIPTABLEPLUGIN \
  49.   NS_IMETHOD GetScriptablePeer(void * *aScriptablePeer); \
  50.   NS_IMETHOD GetScriptableInterface(nsIID * *aScriptableInterface); 
  51.  
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  53. #define NS_FORWARD_NSISCRIPTABLEPLUGIN(_to) \
  54.   NS_IMETHOD GetScriptablePeer(void * *aScriptablePeer) { return _to GetScriptablePeer(aScriptablePeer); } \
  55.   NS_IMETHOD GetScriptableInterface(nsIID * *aScriptableInterface) { return _to GetScriptableInterface(aScriptableInterface); } 
  56.  
  57. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  58. #define NS_FORWARD_SAFE_NSISCRIPTABLEPLUGIN(_to) \
  59.   NS_IMETHOD GetScriptablePeer(void * *aScriptablePeer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptablePeer(aScriptablePeer); } \
  60.   NS_IMETHOD GetScriptableInterface(nsIID * *aScriptableInterface) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptableInterface(aScriptableInterface); } 
  61.  
  62. #if 0
  63. /* Use the code below as a template for the implementation class for this interface. */
  64.  
  65. /* Header file */
  66. class nsScriptablePlugin : public nsIScriptablePlugin
  67. {
  68. public:
  69.   NS_DECL_ISUPPORTS
  70.   NS_DECL_NSISCRIPTABLEPLUGIN
  71.  
  72.   nsScriptablePlugin();
  73.  
  74. private:
  75.   ~nsScriptablePlugin();
  76.  
  77. protected:
  78.   /* additional members */
  79. };
  80.  
  81. /* Implementation file */
  82. NS_IMPL_ISUPPORTS1(nsScriptablePlugin, nsIScriptablePlugin)
  83.  
  84. nsScriptablePlugin::nsScriptablePlugin()
  85. {
  86.   /* member initializers and constructor code */
  87. }
  88.  
  89. nsScriptablePlugin::~nsScriptablePlugin()
  90. {
  91.   /* destructor code */
  92. }
  93.  
  94. /* readonly attribute nsQIResult scriptablePeer; */
  95. NS_IMETHODIMP nsScriptablePlugin::GetScriptablePeer(void * *aScriptablePeer)
  96. {
  97.     return NS_ERROR_NOT_IMPLEMENTED;
  98. }
  99.  
  100. /* readonly attribute nsIIDPtr scriptableInterface; */
  101. NS_IMETHODIMP nsScriptablePlugin::GetScriptableInterface(nsIID * *aScriptableInterface)
  102. {
  103.     return NS_ERROR_NOT_IMPLEMENTED;
  104. }
  105.  
  106. /* End of implementation class template. */
  107. #endif
  108.  
  109.  
  110. #endif /* __gen_nsIScriptablePlugin_h__ */
  111.